/**
 * caicongyang.com Inc.
 * Copyright (c) 2004-2017 All Rights Reserved.
 */
package com.caicongyang.design.factory;

/**
 * @author caicongyang1
 * @version id: OperationFactory, v 0.1 17/5/4 下午7:45 caicongyang1 Exp $$
 */
public class OperationFactory {

    public static Operation createOperation(String operate) {
        Operation opte = null;
        switch (operate) {
            case "+":
                opte = new OperationAdd();
                break;
            case "-":
                opte = new OperationSub();
                break;
        }
        return opte;
    }

}
